<?php 
require_once("class.configs.php");
class conexao{
		public $servidor;
		public $login;
		public $senha;
		public $banco;
				
		function conexao(){
			$this->configBD(); 
			mysql_connect($this->servidor,$this->login,$this->senha) or die(mysql_error());
			mysql_select_db($this->banco)or die(mysql_error());
			mysql_query('SET CHARACTER SET utf8');	
			mysql_query("SET NAMES 'utf8'");
		}
		function configBD(){
			$c = new configs;
			$cf= $c->getConfigs();
			$this->servidor=$cf['servidor'];
			$this->login=$cf["user"];
			$this->senha=$cf["senha"];
			$this->banco=$cf["banco"];
		}
			
}
?>